﻿using aier.dataaccess.dapper;
using aier.dataaccess.model;
using aier.wx.nosql.redis;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace aier.business.logic
{
    public class ScreenEquipmentBll
    {
        public ScreenEquipmentDal screenEquipmentDal { get; set; }

        public EquipmentDal equipmentDal { get; set; }
        /// <summary>
        /// 根据筛查ID,查询营销资源设备q
        /// 原程序 ：ScreenInfoServiceImpl-> qryEquipmentIdsByScreenid(String screenid, DoctorUser doctorUser)
        /// </summary>
        /// <param name="screenId">筛查ID</param>
        /// <returns></returns>
        public IEnumerable<ScreenEquipmentView> QueryScreenEquipmentViewByScreenId(Guid screenId)
        {
            return screenEquipmentDal.QueryScreenEquipmentViewByScreenId(screenId);
        }

        /// <summary>
        /// 根据筛查ID,查询营销资源设备
        /// </summary>
        /// <param name="screenId">筛查ID</param>
        /// <param name="equipmentId">营销资源设备ID</param>
        /// <returns></returns>
        public bool ExistsScreenEquipment(Guid screenId, Guid equipmentId)
        {
            return screenEquipmentDal.ExistsScreenEquipment(screenId, equipmentId);
        }

        public IEnumerable<ScreenEquipmentView> QueryCurrentId(string[]  cruuentNumber)
        {
            return equipmentDal.QueryCurrentId(cruuentNumber);
        }

    }
}
